//封装axios
import axios from "axios";
axios.defaults.baseURL = ' http://127.0.0.1:3007'
axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded';
axios.defaults.headers.common['Authorization'] = localStorage.getItem('token');
axios.defaults.timeout = 2500;
//响应拦截器
axios.interceptors.response.use(
  res => res.data,// 拦截到响应对象，将响应对象的 data 属性返回给调用的地方
  err => Promise.reject(err)
)